Optimal. Leaf size=183 \[ \frac {163 \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \cos (c+d x)}}\right )}{16 \sqrt {2} a^{5/2} d}-\frac {\cos ^3(c+d x) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}-\frac {17 \cos ^2(c+d x) \sin (c+d x)}{16 a d (a+a \cos (c+d x))^{3/2}}-\frac {197 \sin (c+d x)}{24 a^2 d \sqrt {a+a \cos (c+d x)}}+\frac {95 \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{48 a^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.26, antiderivative size = 183, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {2844, 3056,
3047, 3102, 2830, 2728, 212} \begin {gather*} \frac {163 \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a \cos (c+d x)+a}}\right )}{16 \sqrt {2} a^{5/2} d}+\frac {95 \sin (c+d x) \sqrt {a \cos (c+d x)+a}}{48 a^3 d}-\frac {197 \sin (c+d x)}{24 a^2 d \sqrt {a \cos (c+d x)+a}}-\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d (a \cos (c+d x)+a)^{5/2}}-\frac {17 \sin (c+d x) \cos ^2(c+d x)}{16 a d (a \cos (c+d x)+a)^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2728
Rule 2830
Rule 2844
Rule 3047
Rule 3056
Rule 3102
Rubi steps
\begin {align*} \int \frac {\cos ^4(c+d x)}{(a+a \cos (c+d x))^{5/2}} \, dx &=-\frac {\cos ^3(c+d x) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}-\frac {\int \frac {\cos ^2(c+d x) \left (3 a-\frac {11}{2} a \cos (c+d x)\right )}{(a+a \cos (c+d x))^{3/2}} \, dx}{4 a^2}\\ &=-\frac {\cos ^3(c+d x) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}-\frac {17 \cos ^2(c+d x) \sin (c+d x)}{16 a d (a+a \cos (c+d x))^{3/2}}-\frac {\int \frac {\cos (c+d x) \left (17 a^2-\frac {95}{4} a^2 \cos (c+d x)\right )}{\sqrt {a+a \cos (c+d x)}} \, dx}{8 a^4}\\ &=-\frac {\cos ^3(c+d x) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}-\frac {17 \cos ^2(c+d x) \sin (c+d x)}{16 a d (a+a \cos (c+d x))^{3/2}}-\frac {\int \frac {17 a^2 \cos (c+d x)-\frac {95}{4} a^2 \cos ^2(c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx}{8 a^4}\\ &=-\frac {\cos ^3(c+d x) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}-\frac {17 \cos ^2(c+d x) \sin (c+d x)}{16 a d (a+a \cos (c+d x))^{3/2}}+\frac {95 \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{48 a^3 d}-\frac {\int \frac {-\frac {95 a^3}{8}+\frac {197}{4} a^3 \cos (c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx}{12 a^5}\\ &=-\frac {\cos ^3(c+d x) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}-\frac {17 \cos ^2(c+d x) \sin (c+d x)}{16 a d (a+a \cos (c+d x))^{3/2}}-\frac {197 \sin (c+d x)}{24 a^2 d \sqrt {a+a \cos (c+d x)}}+\frac {95 \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{48 a^3 d}+\frac {163 \int \frac {1}{\sqrt {a+a \cos (c+d x)}} \, dx}{32 a^2}\\ &=-\frac {\cos ^3(c+d x) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}-\frac {17 \cos ^2(c+d x) \sin (c+d x)}{16 a d (a+a \cos (c+d x))^{3/2}}-\frac {197 \sin (c+d x)}{24 a^2 d \sqrt {a+a \cos (c+d x)}}+\frac {95 \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{48 a^3 d}-\frac {163 \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{16 a^2 d}\\ &=\frac {163 \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \cos (c+d x)}}\right )}{16 \sqrt {2} a^{5/2} d}-\frac {\cos ^3(c+d x) \sin (c+d x)}{4 d (a+a \cos (c+d x))^{5/2}}-\frac {17 \cos ^2(c+d x) \sin (c+d x)}{16 a d (a+a \cos (c+d x))^{3/2}}-\frac {197 \sin (c+d x)}{24 a^2 d \sqrt {a+a \cos (c+d x)}}+\frac {95 \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{48 a^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(587\) vs. \(2(183)=366\).
time = 6.35, size = 587, normalized size = 3.21 \begin {gather*} -\frac {163 \cos ^5\left (\frac {c}{2}+\frac {d x}{2}\right ) \log \left (\cos \left (\frac {c}{4}+\frac {d x}{4}\right )-\sin \left (\frac {c}{4}+\frac {d x}{4}\right )\right )}{4 d (a (1+\cos (c+d x)))^{5/2}}+\frac {163 \cos ^5\left (\frac {c}{2}+\frac {d x}{2}\right ) \log \left (\cos \left (\frac {c}{4}+\frac {d x}{4}\right )+\sin \left (\frac {c}{4}+\frac {d x}{4}\right )\right )}{4 d (a (1+\cos (c+d x)))^{5/2}}-\frac {40 \cos \left (\frac {d x}{2}\right ) \cos ^5\left (\frac {c}{2}+\frac {d x}{2}\right ) \sin \left (\frac {c}{2}\right )}{d (a (1+\cos (c+d x)))^{5/2}}+\frac {8 \cos \left (\frac {3 d x}{2}\right ) \cos ^5\left (\frac {c}{2}+\frac {d x}{2}\right ) \sin \left (\frac {3 c}{2}\right )}{3 d (a (1+\cos (c+d x)))^{5/2}}-\frac {40 \cos \left (\frac {c}{2}\right ) \cos ^5\left (\frac {c}{2}+\frac {d x}{2}\right ) \sin \left (\frac {d x}{2}\right )}{d (a (1+\cos (c+d x)))^{5/2}}+\frac {8 \cos \left (\frac {3 c}{2}\right ) \cos ^5\left (\frac {c}{2}+\frac {d x}{2}\right ) \sin \left (\frac {3 d x}{2}\right )}{3 d (a (1+\cos (c+d x)))^{5/2}}+\frac {\cos ^5\left (\frac {c}{2}+\frac {d x}{2}\right )}{8 d (a (1+\cos (c+d x)))^{5/2} \left (\cos \left (\frac {c}{4}+\frac {d x}{4}\right )-\sin \left (\frac {c}{4}+\frac {d x}{4}\right )\right )^4}-\frac {29 \cos ^5\left (\frac {c}{2}+\frac {d x}{2}\right )}{8 d (a (1+\cos (c+d x)))^{5/2} \left (\cos \left (\frac {c}{4}+\frac {d x}{4}\right )-\sin \left (\frac {c}{4}+\frac {d x}{4}\right )\right )^2}-\frac {\cos ^5\left (\frac {c}{2}+\frac {d x}{2}\right )}{8 d (a (1+\cos (c+d x)))^{5/2} \left (\cos \left (\frac {c}{4}+\frac {d x}{4}\right )+\sin \left (\frac {c}{4}+\frac {d x}{4}\right )\right )^4}+\frac {29 \cos ^5\left (\frac {c}{2}+\frac {d x}{2}\right )}{8 d (a (1+\cos (c+d x)))^{5/2} \left (\cos \left (\frac {c}{4}+\frac {d x}{4}\right )+\sin \left (\frac {c}{4}+\frac {d x}{4}\right )\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.16, size = 242, normalized size = 1.32
method | result | size |
default | \(\frac {\sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (128 \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\, \left (\cos ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+489 \sqrt {2}\, \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) \left (\cos ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -512 \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\, \left (\cos ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-87 \sqrt {a}\, \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+6 \sqrt {a}\, \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\right )}{96 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} a^{\frac {7}{2}} \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d}\) | \(242\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 208, normalized size = 1.14 \begin {gather*} \frac {489 \, \sqrt {2} {\left (\cos \left (d x + c\right )^{3} + 3 \, \cos \left (d x + c\right )^{2} + 3 \, \cos \left (d x + c\right ) + 1\right )} \sqrt {a} \log \left (-\frac {a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {2} \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {a} \sin \left (d x + c\right ) - 2 \, a \cos \left (d x + c\right ) - 3 \, a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) + 4 \, {\left (32 \, \cos \left (d x + c\right )^{3} - 160 \, \cos \left (d x + c\right )^{2} - 503 \, \cos \left (d x + c\right ) - 299\right )} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{192 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.39, size = 122, normalized size = 0.67 \begin {gather*} \frac {\frac {3 \, \sqrt {2} {\left (29 \, \sqrt {a} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 27 \, \sqrt {a} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2} a^{3} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} - \frac {128 \, \sqrt {2} {\left (a^{\frac {13}{2}} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, a^{\frac {13}{2}} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{a^{9} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{96 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\cos \left (c+d\,x\right )}^4}{{\left (a+a\,\cos \left (c+d\,x\right )\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________